package com.kata.chapter11;

import java.util.ArrayList;
import java.util.List;

/**
 * 手机生产组装流程
 * Created by tzhang on 12/1/2014.
 */
public class PhoneConfigProcess {

    private static List<String> functionTask = new ArrayList<String>();

    /**
     * Nokia 高端手机
     * @return
     */
    public NokiaPhone nokia930() {
        functionTask.clear();
        functionTask.add("open");
        functionTask.add("music");
        functionTask.add("welcomeScreen");
        functionTask.add("startSystem");
        NokiaPhoneBuilder builder = new NokiaPhoneBuilder();
        builder.setFunctionTaskList(functionTask);
        return builder.getPhone();
    }

    /**
     * Nokia 低端手机
     * @return
     */
    public NokiaPhone nokia108() {
        functionTask.clear();
        functionTask.add("open");
        functionTask.add("startSystem");
        NokiaPhoneBuilder builder = new NokiaPhoneBuilder();
        builder.setFunctionTaskList(functionTask);
        return builder.getPhone();
    }


    /**
     * 标准版IPHONE 5
     * @return
     */
    public IPhone iPhone5() {
        functionTask.clear();
        functionTask.add("open");
        functionTask.add("music");
        functionTask.add("welcomeScreen");
        functionTask.add("startSystem");
        IPhoneBuilder builder = new IPhoneBuilder();
        builder.setFunctionTaskList(functionTask);
        return builder.getPhone();
    }

    /**
     * 塑料玩具版IPHONE 5
     * @return
     */
    public IPhone iPhone5c() {
        functionTask.clear();
        functionTask.add("open");
        functionTask.add("welcomeScreen");
        functionTask.add("startSystem");
        IPhoneBuilder builder = new IPhoneBuilder();
        builder.setFunctionTaskList(functionTask);
        return builder.getPhone();
    }
}
